/**
 * 
 */
package com.xinnet.mms.enums;

import com.xinnet.mms.utils.CustomerManage;

/**
 * 客户接收状态枚举
 * @author 李丽华
 * @author $Author:$
 * @version $Revision:$ $Date:$ 
 * @since 2014-6-5
 * 
 */
public enum CustomerStateEnmu {

	ACCEPT_NO(CustomerManage.ACCEPT_NO,"未接收 "),
	ACCEPT_YES(CustomerManage.ACCEPT_YES,"已接收 ");
	
	private Integer value;
	
	private String label;
	
	private CustomerStateEnmu(Integer value, String label){
		this.value = value;
		this.label = label;
	}
	
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	
	/**
	 * 根据value获取对应的枚举
	 * @param value
	 * @return
	 */
	public static CustomerStateEnmu getCustomerStateEnmuByValue(Integer value){
		CustomerStateEnmu[] custEnums = CustomerStateEnmu.values();
		for (CustomerStateEnmu customerStateEnmu : custEnums) {
			if(customerStateEnmu.getValue().equals(value)){
				return customerStateEnmu;
			}
		}
		return null;
	}
}
